package com.sunwayhorizo.health.hl7.rim;

import com.sunwayhorizo.health.hl7.common.DataTypeUtil;
import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.datatypes.BL;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;


@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("QUAL")
public class QualifiedEntity extends Role implements Serializable {
    
/**
     * 
     */
    protected static final long serialVersionUID = 1L;

//    public BL equivalencelnd;
    
    public QualifiedEntity() {
    }


    public void setEquivalencelnd(BL equivalencelnd) {
        this.setQeEquivalenceFlag(equivalencelnd.toString());
    }

    public BL getEquivalencelnd() throws Hl7Exception {
        return DataTypeUtil.getBL(this.getQeEquivalenceFlag());
    }
    
    @Column(name = "QE_EQUIVALENCE_FLAG")    protected String qeEquivalenceFlag;

    protected void setQeEquivalenceFlag(String qeEquivalenceFlag) {
        this.qeEquivalenceFlag = qeEquivalenceFlag;
    }

    protected String getQeEquivalenceFlag() {
        return qeEquivalenceFlag;
    }
}
